class LineItem < ActiveRecord::Base
  belongs_to :order
  belongs_to :product
  belongs_to :cart
  # validates :quantity, numericality:{greater_than_equal_to: 1,message:': 删没了'}
  def total_price 
    product.price * quantity
    # price * quantity
  end
  
 
end
